﻿#include <QtGui>
#include "Dialog.h"

Dialog::Dialog(QWidget *parent)
	: QDialog(parent)
{

	QGroupBox *groupBox = new QGroupBox(tr("Out Data"));

	mtrCheckBox = new QCheckBox(tr("Out matrix in file"));
	condCheckBox = new QCheckBox(tr("Out Cond in file"));

	okButton = new QPushButton(tr("&Accept"));
	cencleButton = new QPushButton(tr("&Cancel"));

	buttonBox = new QDialogButtonBox(Qt::Horizontal);
	buttonBox->addButton(okButton, QDialogButtonBox::ActionRole);
	buttonBox->addButton(cencleButton, QDialogButtonBox::ActionRole);

	connect(okButton, SIGNAL(toggled(bool)), this, SLOT(setVisible(bool)));

	QBoxLayout *layout = new QBoxLayout(QBoxLayout::Direction::TopToBottom,this);
	layout->addWidget(mtrCheckBox);
	layout->addWidget(condCheckBox);
	groupBox->setLayout(layout);
	//layout->addStretch(1);
	QHBoxLayout *hlayout = new QHBoxLayout;
	hlayout->addWidget(buttonBox);

	QVBoxLayout *vlayout = new QVBoxLayout;
	vlayout->addWidget(groupBox);
	vlayout->addLayout(hlayout);
	setLayout(vlayout);
	

	setWindowTitle(tr("SPCN Options"));
}

